//
//  EditPhotoTableViewCell.m
//  UniversalApp
//
//  Created by 志刚杨 on 2018/2/1.
//  Copyright © 2018年 voidcat. All rights reserved.
//

#import "EditPhotoTableViewCell.h"
#import "CYImageAdd.h"
@implementation EditPhotoTableViewCell
{

}
- (void)awakeFromNib {
    [super awakeFromNib];
    @weakify(self);
    
    //嵌套太多了
    _addimage = [[CYImageAdd alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 240)];
    _addimage.deleClickBlock = ^(NSString *type, NSString *imgid, int index) {
        if(weak_self.deleClickBlock)
        {
            weak_self.deleClickBlock(type,imgid,index);
        }
    };    
    _addimage.addClickBlock = ^{
        if(weak_self.addClickBlock)
        {
            weak_self.addClickBlock();
        }
    };

    
    [self.contentView addSubview:_addimage];
}

-(void)addImage:(NSArray *)imageArray;
{
    //容错处理
    if(imageArray == nil)
    {
        imageArray = [NSArray array];
    }
    
    [_addimage addImage:imageArray];
}

-(void)removieAuditingIndex:(NSInteger)index
{
    [_addimage removieAuditingIndex:index];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
